package tracex

import (
	"context"
	"go.opentelemetry.io/otel"
	"go.opentelemetry.io/otel/trace"
)

// TraceName represents the tracing name.
const traceName = "go-zero"

func NewSpanCtx(ctx context.Context, spanName string, spanKind trace.SpanKind) (context.Context, trace.Span) {
	return otel.Tracer(traceName).Start(ctx, spanName, trace.WithSpanKind(spanKind))
}
